package net.zoneland.knowledge.enums;

/**
 * 访问类型.
 *
 * @author: zmq
 * 2021/9/29
 */
public enum VisitTypeEnum {
    /**
     * PC.
     */
    PC("PC","PC端"),

    /**
     * MOA
     */
    MOA("MOA","MOA端");

    VisitTypeEnum(final String value, final String name) {
        this.value = value;
        this.name = name;
    }
    /**
     * key.
     */
    private String value;

    /**
     * label
     */
    private String name;

    /**
     * .
     *
     * @return value
     */
    public String getValue() {
        return value;
    }

    /**
     * .
     *
     * @return name
     */
    public String getName() {
        return name;
    }

    public static VisitTypeEnum getByValue(String value) {
        for(VisitTypeEnum categoryEnum : VisitTypeEnum.values()) {
            if (categoryEnum.value.equals(value)) {
                return categoryEnum;
            }
        }
        return null;
    }

}
